<template>
  <div  class="body-bg ">
    <el-container>
      <el-header class="topHeader">
        <div class="logo">
          <svg-icon iconClass="mountain-range" className="mountainRange" />
          <span>考研资料分享系统</span>
        </div>       
      </el-header>
    </el-container>
    <el-container>
      <el-header class="bannerHeader">
        <el-menu
          class="el-menu-vertical-demo"
          @open="handleOpen"
          @close="handleClose"
          mode="horizontal"
          menu-trigger="hover"
          router
        >
          <el-menu-item index="/manger/usermanger"><svg-icon iconClass="personal" className="personal" /> 用户信息管理 </el-menu-item>
          <el-menu-item index="/manger/filemanger"><svg-icon iconClass="filemanger" className="filemanger" />文件管理</el-menu-item>
      
        </el-menu>
      </el-header>
      <el-main>
        <router-view></router-view>
      </el-main>
       <el-footer>
          	2021 &copy; guqingyao.
       </el-footer>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isCollapse: true,
    };
  },
  methods: {
    handleOpen(key, keyPath) {
      console.log(key, keyPath);
    },
    handleClose(key, keyPath) {
      console.log(key, keyPath);
    },
    exit(){
          this.$router.push({
        name: "Login",
      });
  
    },
        personal(){
               this.$router.push({
        name: "Information",
      });
        }
  },
};
</script>

<style scoped>
.el-footer{
  background-color: #fff;
  color: black;
  padding-left:60px ;
  line-height: 60px;
  border-top:solid 1px rgb(221, 221, 221);
 
}
.avatar {
  margin-right: 80px;
  margin-top: 10px;
}
.topHeader {
  background-color: rgb(47, 53, 63);
  color: rgb(255, 255, 255);
  line-height: 60px;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
}
.bannerHeader {
  line-height: 65px;
  background-color: rgb(255, 255, 255);
}
.el-avatar {
  cursor: pointer;
}

.el-menu--collapse {
  width: 110px;
}
.el-menu-vertical-demo {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.mountainRange {
  transform: translateY(4px);
  font-size: 20px;
}

.logo span {
  padding-left: 10px;
}
.logo {
  margin-left: 60px;
}
.body-bg {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  overflow-y: auto;
  background: #f5f5f5 !important;
}
svg{
  font-size: 25px;
  margin-right: 5px;
  margin-top: 0px;
}
</style>
